<?php
require_once('libs/MySmarty.php');
require_once('libs/DbAccess.php');
require_once('classes/share.class.php');

$formPage = new share();

$_action = isset($_REQUEST['actionType']) ? $_REQUEST['actionType'] : 'view';
//echo $_REQUEST['actionType'];
switch($_action) {
    case 'del':
        $formPage->deletSite($_REQUEST); 
		$formPage->displayListForm($_REQUEST); 
        break;
    case 'insert':
		$formPage->doInsert($_REQUEST); 
		$formPage->displayListForm($_REQUEST); 
        break;
    case 'view':
    default:
        // viewing the guestbook
        $formPage->displayListForm($_REQUEST); 
		
        break;   
}

?>